﻿@using AspNetCoreMvc.Model;
@{
    Layout = "~/Views/Shares/Index.cshtml";
    //var xx = ViewData["test"] as User;
}
@* @model AspNetCoreMvc.Model.User *@
@model List<User>
<h1>子页面</h1>
<div class="row">
    <div class="col-md-4">
        @*         <form asp-action="Create" method="post">
        <div class="form-group">
        <input asp-for="Name" class="form-control" name="Name" value="@xx.Name" />
        <input asp-for="Name" class="form-control" name="Name" value="@xx.Id" />
        <input asp-for="Name" class="form-control" value="@xx.Age" />
        </div>
        <div class="form-group">
        <input asp-for="Name" class="form-control" name="Name" value="@Model.Name" />
        <input asp-for="Name" class="form-control" name="Name" value="@Model.Id" />
        <input asp-for="Name" class="form-control" value="@Model.Age" />
        </div>
        <div class="form-group">
        <input type="submit" value="创建" class="btn btn-primary" />
        </div>
        </form> *@
        <a href="/Product/Create">跳转页面</a>
        <a href="/Order/Index">跳转Order</a>
        <form asp-action="Create" method="post">
            @foreach (var item in Model)
            {
                <div class="form-group">
                    <input asp-for="Name" class="form-control" name="Name" value="@item.Name" />
                    <input asp-for="Name" class="form-control" name="Name" value="@item.Id" />
                    <input asp-for="Name" class="form-control" value="@item.Age" />
                </div>
            }
        </form>
    </div>
</div>